<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{/*权值 0  很容易被覆盖*/
				color: #aaffff !important;
				background: #ffaaff;
			}
			div{/*权值 1*/
				color: #aaaaff;
				background: #ffaa7f;
			}
			.d1{/*权值 10*/
				color: #00ff7f;
				background: #ffff7f;
			}
			div.d1{/*选择器权值之和  权值1+10=11*/
				color: #ff557f;
				background: #aa55ff;
			}
			body div.d1{/*权值 12*/
				font-size: 25px;
				color: #aaffff;
				background: #ffaa7f;
			}
			#d1{/*权值 100*/
				font-size: 15px;
				color: #aaff7f;
				background: #aa557f;
			}
			div#d1{/*权值 101*/
				font-size: 20px;
				color: #ff00ff;
				background: #0055ff;
			}
			div#d1:hover{/*权值 111*/
				color: #55aa7f;
				background: #aaff00;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat esse ex, illo officiis reprehenderit iusto distinctio error qui saepe nam, ad perspiciatis unde veritatis a minus asperiores earum itaque vel.</div>
	</body>
</html>